package com.wehealth;

import java.util.List;

import com.wehealth.adapter.PlanWeekAdapter;

import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ListView;

public class SelectPlanDialog extends Dialog{

	private ListView depart_list;
    private Context context;
    private OnItemClickListener onItemClickListener;
    private String[] departs;

	public SelectPlanDialog(Context context,int theme,OnItemClickListener onItemClickListener,String[] departs) {
		super(context,theme);
		// TODO Auto-generated constructor stub
		this.context = context;
		this.onItemClickListener = onItemClickListener;
		this.departs = departs;
		
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.select_plan_dialog);
		depart_list =(ListView)findViewById(R.id.dialog_list);
		PlanWeekAdapter adapter = new PlanWeekAdapter(context, departs);
		depart_list.setAdapter(adapter);
		depart_list.setOnItemClickListener(onItemClickListener);
		
		Button bt =(Button)findViewById(R.id.dialog_bt);
		bt.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				dismiss();
			}
		});
	}
	
	
	
	

}
